<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>注册</title> <link rel="stylesheet" th:href="@{/css/index.css}">
</head>
<body>
<div class="login-container">
    <h2>用户注册</h2>
    <form th:action="@{/register}" method="post">
        <div class="form-group">
            <label for="username">用户名:</label>
            <input type="text" id="username" name="username" required>
        </div>
        <div class="form-group">
            <label for="password">密码:</label>
            <input type="password" id="password" name="password" required>
        </div>
        <div class="form-group">
            <label for="repassword">确认密码:</label>
            <input type="password" id="repassword" name="repassword" required>
        </div>
        <div class="form-group">
            <label for="name">真实姓名:</label>
            <input type="text" id="name" name="name" required>
        </div>
        <div class="form-group captcha">
            <label for="captcha">验证码:</label>
            <input type="text" id="captcha" name="captcha" required>
            <img th:src="@{captcha}" alt="验证码">
        </div>
        <div class="form-group">
            <p class="error" th:text="${message}"></p>
            <br/>
            <input type="submit" value="注册">
        </div>
        <a th:href="@{/login}">已有账号？去登录</a>
    </form>
</div>
</body>
</html>